home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / GRAPIDS.CMD < prev    next >
Encoding:
Text File  |  1996-02-16  |  1.5 KB  |  63 lines

  1. #        The Grand Rapids Free Net Login.cmd
  2. #
  3. # Trumpet 2.0 login script
  4. # Modified Sept. 8, 1995
  5.  
  6. # In the PPP Options selection under the File menu set the PAP
  7. # option and enter your login id and password.
  8.  
  9. # Under the Dialler menu run the setup.cmd script. Enter the 
  10. # phone number, leave the user id and password entries blank.
  11.  
  12. #  trace on
  13.  
  14. #----------------------------------------------------------
  15. # read the phone number from the ini file
  16.  
  17.     if ! [load $number]
  18.       display \n"No Phone Number - Run the Setup Script"\n
  19.       abort
  20.     end
  21.  
  22. #----------------------------------------------------------
  23. # initialize variables
  24.  
  25.     %attempts = 50
  26.     %count = 0
  27.     %connect = 0
  28.     %busy = 0
  29.  
  30. #----------------------------------------------------------
  31. # initialize the modem
  32.  
  33.     display "Initializing Modem ..."\n
  34.     output "ATZ"\n
  35.     if ! [input 10 OK\n]
  36.       display \n"Modem is not responding"\n
  37.       abort
  38.     end
  39.  
  40. #----------------------------------------------------------
  41. # dial the phone number
  42.   
  43.     display "Dialing ..."\n
  44.     repeat
  45.       if %count = %attempts
  46.         display \n"Too many dial attempts"\n
  47.         abort
  48.       end
  49.       output "ATTD "$number\n
  50.       %busy = [input 10 BUSY]
  51.       if ! %busy
  52.         %connect = [input 45 CONNECT]
  53.       end
  54.       %count = %count + 1
  55.     until %connect
  56.  
  57. #----------------------------------------------------------
  58. # give the modem time to connect
  59.  
  60.     wait 30 dcd
  61.  
  62. #----------------------------------------------------------
  63. # End OF Script